package com.ryan.spring.cloud.gateway.filter;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;

/**
 * Created by kaimin on 23/1/2019.
 * time : 13:58
 */
@Component
@Slf4j
public class LogFilter extends AbstractGatewayFilterFactory{
    @Override
    public GatewayFilter apply(Object config) {
        log.info("------> LogFilter process");
        return ((exchange, chain) -> {
            return chain.filter(exchange);
        });
    }


}
